The present invention generally concerns an input device, and in particular, an input device that enables a user to manipulate a cursor or other graphic object, make selections, and control a computer.
Pointing devices, such as computer mice and trackballs, are used to provide user input to a computer program and are well known in the art. Such pointing devices enable a user to easily move a cursor on a display screen, and are fundamental to programs and operating systems that employ a graphical user interface, such as the Microsoft Corporation""s WINDOWS(trademark) and Apple Corporation""s MACINTOSH(trademark) operating systems. In a typical pointing device, a ball is rotated in the housing of the device, either directly by the user""s fingers, or by movement of the device over a surface. Depending upon its direction of rotation, the rotating ball in turn causes one or both of a pair of encoder shafts in the housing to rotate. The encoder shafts rotate about a pair of orthogonal axes, i.e., the xe2x80x9cXxe2x80x9d and xe2x80x9cYxe2x80x9d axes in response to the components of the ball""s rotation along those axes. As the encoders are rotated, they produce signals that indicate the device""s incremental motion along these orthogonal axes; these signals are processed by a driver program executing on a computer, which produces a corresponding stream of digital values indicative of a position of the device relative to the X and Y axes. The driver program also receives other input signals from the pointing device, including a signal indicative of the state of control buttons on the device. The relative position data and the state of the buttons are input to a computer program (or the operating system), which processes the information, causing a predefined action to occur. For example, many operating systems move a cursor displayed on a monitor or other display screen in response to a user""s movement of a pointing device. The X and/or Y movement of the cursor on the display screen is proportional to the motion of the ball (or device) along the respective X and/or Y axes.
In recent years, mouse manufacturers have added a third input axis to their products, commonly known as the xe2x80x9cZxe2x80x9d axis. Originally developed by the Microsoft Corporation for use with its WINDOWS(trademark) operating system, this axis on a mouse is primarily used for scrolling within a document or displayed data. The Z-axis control on a mouse is typically implemented as a detented wheel (the Z-wheel), which is coupled to an encoder that monitors rotation of the Z-wheel by a user. Detents on the rotational motion of the wheel enable a user to scroll a document or data display in consistent increments specified by the user, such as a predetermined number of lines/detent, or a screen/detent. The Z-wheel is typically mounted vertically and disposed toward the front of a mouse so that it can be readily turned with a user""s finger. The detent positions are typically spaced at increments of about 20 degrees.
In order to obtain a desired level of performance, the output signal produced by the Z-axis encoder should accurately correspond to the number and direction of detent positions that the user rotates the Z-wheel. For example, if a user rotates the Z-wheel through five detent positions in a forward direction (rotating the top of the Z-wheel toward the front of the mouse), this movement should be reflected by the computer program, e.g., by the program scrolling forward in a document displayed on a monitor through five of the scrolling increments previously selected by the user.
Several techniques have been implemented in prior art Z-wheel mice to address this performance requirement. One solution is to use a mechanical encoder with a built-in detent. In this type of device, a mechanical detent is closely coupled with the encoder that produces an electrical output signal, which satisfies the foregoing performance requirement. However, mechanical encoders of this type generally cost more than may be desired. Therefore, a less-expensive optical encoder scheme is preferable for accurately detecting rotation of the Z-wheel through detent positions.
Optical encoders are commonly used to detect motion and/or position of a member. Two classes of optical encoders are incremental encoders, and absolute encoders. There are also two types of optical encoders, including rotary encoders and linear encoders. Incremental rotary encoders are suitable for use in a mouse. Ideally, an incremental encoder produces a pair (two channels) of square wave signals that are approximately 90 degrees out of phase; this type of output signal is commonly referred to as a quadrature output. The quadrature output is processed to determine the amount of rotation of an element (such as a wheel) monitored by the encoder, and the direction of the element""s rotation.
The primary components of a typical optical encoder (prior art) are shown in FIGS. 1 and 2, and include a codewheel or code disk 10, a light emitter 12, and an integrated detection circuit 14. The codewheel generally comprises a plurality of equally-spaced teeth 16, forming slots 18, which may be fully enclosed, or is made from a clear plastic or glass disk imprinted with a radially-spaced pattern of lines, commonly called a xe2x80x9cmask.xe2x80x9d Light emitter 12 typically comprises an LED 20, which emits light rays 21 that are collimated into a parallel beam by a lens 22. Integrated detector circuit 14 is disposed opposite the light emitter and typically comprises at least two photodetectors 24 (as shown in FIG. 2), or two sets of photodetectors (as shown in FIG. 1), noise reduction circuitry 26, and comparators 28. Suitable photodetectors include photodiodes and phototransistors.
The codewheel is disposed relative to the light emitter and integrated detector circuit so that when it is rotated, its slotted or lined portion is between the light emitter and integrated detector circuit. The light beam passing from the light emitter to the integrated detector circuit is thus interrupted by the part of the codewheel between the pattern of slots or by the radial lines on the codewheel. Any portion of the light beam that is not blocked by the codewheel (or the lines that are imprinted) is detected by the photodetectors. The photodetectors typically produce an analog output signal that is proportional to the intensity of light they detect. In general, the output signal produced by each photodetector as the codewheel is turned at a constant rate is sinusoidal. The photodetectors are arranged in a pattern that is a function of the radius and count density of the codewheel, so as to produce a quadrature output.
In the embodiment shown in FIG. 1, the photodetectors are spaced such that a light period on one pair of photodetectors corresponds to a dark period on an adjacent pair of photodetectors, thereby producing two complimentary outputs for each channel. The photodetector outputs are processed by the noise reduction circuitry, which removes extraneous noise. The resulting four signals are then evaluated by the comparators (one comparator for each complimentary pair of signals), which produce a digital waveform corresponding respectively to channels A and B. The digital waveform has voltage levels corresponding to a logic level zero and a logic level one. If the encoder wheel is turned at a constant angular rate, the output signals on channels A and B will be similar to the waveforms shown in FIG. 3C, wherein the digital waveform of channel A is approximately 90 degrees out of phase (in quadrature) with channel B. In actual practice, the waveforms are not perfectly square due to signal propagation delays, switching latencies, etc.xe2x80x94however, the waveforms approximate square waves.
The quadrature output of an encoder can be evaluated to determine the present state of the encoder and the direction that it is being turned or is moving. FIG. 3B shows a typical state table corresponding to a full quadrature encoding scheme, and the corresponding state transitions are shown in FIG. 3A. The state of the encoder is dependent on the logic value of each channel. For example, if the logic values of channels A and B are respectively 1 and 0 (represented simply as xe2x80x9c(10)xe2x80x9d), the state is 1. By examining changes in the state of the encoder, it is possible to determine the present position of the encoder by integrating its incremental motion. A common scheme used to perform this task is shown in FIG. 3C, wherein the state is evaluated at each falling edge of a clock input signal. The direction of rotation of the encoder wheel can also be determined by determining which channel leads the other, e.g., A leading B indicates clockwise rotation of the wheel; B leading A indicates counterclockwise rotation of the wheel.
FIG. 3D shows a state transition table corresponding to the full quadrature transition states discussed above. The state transition table indicates when a transition is reported based on a sensed change in the position of the encoder wheel. In the case of full quadrature encoding, every change in state on either channel produces either a xe2x80x9c+xe2x80x9d or xe2x80x9cxe2x88x92xe2x80x9d change in the output produced by processing the channels. Put another way, there are two state changes for each change in the output signal on a given channel. As a result, this scheme multiplies the resolution of the encoder wheel by four. For an encoder wheel with X teeth, the resolution with which rotation of the wheel can be monitored is 4X. Thus, this type of quadrature encoding is referred to as 4X encoding.
The foregoing optical encoder has several drawbacks when used in a mouse or trackball. A primary problem is that it is too expensive. Each photodiode has a finite cost, and the noise reduction circuitry and comparators also add to the expense of the encoder. Another problem is that the integrated detector circuit portion of the encoder generally takes up too much space. Additionally, the level of precision required for an input axis on a mouse is much lower than the level of precision required in other applications that typically often employ optical encoders of the foregoing design, such as motion controllers, robotics, etc.
In order to address the size and cost limitations of encoders suitable for use in a mouse, an optical encoder scheme has been developed that requires fewer components and is much less costly to manufacture. An example of such a scheme is shown in FIG. 4. As shown therein, the detection circuit has been reduced to a pair of phototransistors 30, each of which produces an analog output signal applied respectively to a non-inverting Schmidt trigger 32. The Schmidt triggers are used to minimize the effects of extraneous noise in the raw signals provided by the phototransistors. Optionally, other types of comparator circuits can be used in place of the Schmidt triggers. The output of the Schmidt triggers is input to a microcontroller, which processes the signals on channels A and B using a special duty-cycle control algorithm to produce a digital waveform in quadrature, which is further processed by a microcontroller to determine the incremental motion imparted to the encoder wheel of the device. Details of the duty-cycle control algorithm, which is discussed briefly below, are disclosed in U.S. Pat. No. 5,256,913, the disclosure and drawings of which are hereby specifically incorporated herein by reference. The output from the microcontroller is passed through a serial communication link to a computer (e.g., through an RS-232 serial port, a universal serial bus port, or a PS/2 port). A driver in the operating system (or in an application program) processes the output from the microcontroller to control the display on the computer screen in response to the movement of the encoder wheel.
As might be expected, the waveforms produced by the phototransistor/Schmidt trigger/duty-cycle control algorithm scheme are not as accurate and clean as the waveforms produced by the detection circuit of FIG. 1. Due to the lower accuracy of the waveforms, there is a higher probability that a logic level change (a transition between a high and low voltage level) on a channel might be missed, or that a false logic level change might be indicatedxe2x80x94either of which would cause the movement of the encoder wheel to be inaccurately reflected in the control action implemented by the computer. To overcome this problem, a new state transition scheme was developed as shown in FIGS. 5A and 5B. In this state transition scheme, there are two electrical state changes required for each detent position of the encoder wheel, which reduces the impact of missed state transitions and false signals, but is still susceptible to several troublesome problems when used with a detented control wheel.
A more detailed view of the prior art detented wheel/optical encoder assembly shown in FIG. 2 is illustrated in FIG. 6. The assembly includes a wheel 50 mounted on a shaft 52, which is supported at one end by a bearing 54 in a support bracket 56, and at an opposite (free) end by a metal coil spring 58, which is displaced over a post (not shown). Lateral movement of the shaft is restricted by a slot 60 defined in a slotted bracket 62, through which the shaft extends. Support bracket 56, the spring post, and slotted bracket 62 all extend upwardly from the interior surface of a lower case 64. Coil spring 58 and slot 60 allow the free end of the shaft to pivot in bearing 54 (which is slightly elongated in the vertical direction to allow for such pivoting), permitting the wheel to be vertically displaced when a downward force is applied to it. This vertical displacements enables a collar 66 formed in the shaft to actuate a microswitch (not shown) mounted beneath the collar. The actuation of the microswitch by a user changes a scrolling mode of the display. An upward force provided by coil spring 58 biases the free end of the shaft upwardly away from the microswitch when the downward force on the wheel is removed. Formed as an integral part of the shaft is a codewheel 10, with a plurality of teeth 16 defining slots 18 (shown in FIG. 1), as discussed above. The teeth and slots pass between light emitter 12 and phototransistors 24 (see FIGS. 1 and 2), which are mounted in a detector housing 68. The detector housing and the light emitter are mounted to a common base 70, which clips into a printed circuit board (PCB) 72 and defines a location hole 74 that is used to locate the base relative to an alignment pin 76 extending from the interior surface of the lower case.
The assembly produces a detent action through the use of a metal leaf spring 78, which has a protrusion 80 formed on its upper free end. This protrusion rides against a splined portion 82 of the shaft comprising a plurality of spline teeth separated by spline wells. The lower fixed end of the metal leaf spring is mounted to support bracket 56 (at a point disposed under the PCB). As the shaft is rotated, the protrusion riding on the splined portion of the shaft causes the spring to flex, thereby creating a detent action.
The force required to move the wheel from one detent position to the next varies with the angular position of the wheel as it is rotated between the detent positions. FIG. 7 illustrates the relative displacement of the protrusion 80 with respect to the spline teeth as the shaft 52 is rotated. The force the leaf spring exerts on the hub varies linearly with this displacement. As the wheel is rotated, protrusion 80 moves in and out of the spline wells and over the spline teeth, thereby changing the pressure angle (i.e., the angle of the normal surface at the contact point) between the protrusion and a spline tooth. Assume the leaf spring is configured to be displaced in a vertical direction. In general (without considering friction), for a given amount of wheel torque, the vertical component of the force acting on the leaf spring (i.e., causing the leaf spring to flex) is proportional to the vertical component of the pressure angle. As a result, the maximum amount of torque encountered when rotating the wheel between detent positions occurs immediately after leaving a detent position, as shown in FIG. 15. Additionally, as the wheel is further rotated, the torque needed to rotate the wheel will become negative as the protrusion slides over the top of a spline tooth, thereby causing the wheel to move forward into the next detent position as the spring bias force causes the protrusion to slide into the next spline well.
Under optimal circumstances, there should be a tendency for the wheel to always return to a detent position if a user releases the wheel (stops applying a rotational force to the wheel), regardless of the angular position of the wheel when released. However, as shown in each region enclosed by an ellipse in FIG. 7 and in FIG. 8, there are areas between detent positions, known as balance areas, where the wheel will hang and not return to a detent position if it is released, i.e., if the user stops applying a rotational force to the wheel. (If the wheel is released outside of one these balance areas, the wheel will always move to the nearest detent position, as is desired.) Due to variations in friction caused by non-symmetrical spring geometry, the balance point for rotation of the wheel in a forward direction is not necessarily coincident with the balance point for rotation of the wheel in a reverse direction.
FIG. 7 also illustrates another problem that can be encountered with a detented optical encoder, known as bounce back. Bounce back occurs when a user turns or rolls the wheel forward quickly and then releases the wheel just prior to passing through a balance point to the next detent position. If the wheel has been rolled forward rapidly, it is possible for the wheel to continue rolling for a short duration in its present direction after the user has stopped turning the wheel, due to the angular momentum of the encoder wheel. The wheel will slow down, stop, then return to the previous detent position. If the electrical system senses a transition point prior to the direction of wheel rotation reversing, the result will be that the last electrical count is reported in a direction opposite that in which the user was rolling the encoder wheel. This problem will be more clearly understood from the following explanation.
At position A, the encoder wheel is moving forward and a forward transition is reported, as indicated by a xe2x80x9c+.xe2x80x9d At position B, the encoder wheel is moving forward and a second forward transition is reported. Between positions B and C, the user stops turning the encoder wheel, but the angular momentum causes the encoder wheel to continue rolling forward. At position C, the encoder wheel is rotating forward very slowly, but a forward transition is reported. Just after position C, the encoder wheel stops; it then changes direction, and returns to the previous detent position. However, at position D, the encoder wheel is rotating in the reverse direction, and a transition in the reverse direction is reported. At position E, the encoder wheel comes to rest. As a result of the preceding scenario, an extra forward transition and an extra reverse transition are registered by the encoder, even though the user did not intend the transitions C+ and Dxe2x88x92 to be registered. These erroneous transition registrations can be quite bothersome, especially if a user is working on a relatively slow computer on which a lag time between the instant when a scrolling request is received and the instant that the display or data actually scrolls is very evident. In such a case, the user is forced to wait for the false forward and reverse transitions to be implemented on the display before continuing to work on the document or data.
Ideally, the reporting of a transition state change indicating a user movement of the wheel to a new detent position (called the transition point) should occur just after passing the balance region. At this point, it is certain that the encoder wheel will move to the next detent position if the user releases (stops turning) the wheel, and bounce back cannot occur. In addition, it is preferable that the reported transition point (i.e., the angle at which the encoder wheel is when a transition is reported) for both a forward and reverse encoder wheel rotation occurs at repeatable positions.
It is not practical to achieve the ideal operation in the prior art encoder wheel design discussed above, due to part and assembly variances commonly associated with the manufacture of large lots of this type of product. For example, a variation of a mere 0.001xe2x80x3 in the location of the protrusion on the leaf spring results in a 0.5 (ATAN [0.001/0.117]) degree shift in the transition angle. Other examples of the adverse effect of manufacturing variances include the variation in the distance between the point on the support bracket to which the leaf spring is mounted and the center of bearing 60 in the support bracket, and the variation in the location of the alignment pin relative to the bearing. The variation in the dimensions within reasonably achievable manufacturing tolerances of the various parts comprising the encoder assembly and/or the variation in the assembled position of these parts can add together to cause the angular position of the teeth/slots to be outside the specified tolerance. Thus, the reported transition points will be out of tolerance relative to the detent positions. In order to meet the desired performance requirement, the tolerances on the parts that comprise the prior art assembly would have to be so tight that the cost of fabricating this assembly would be prohibitive.
Furthermore, in the prior art design, the location of some of the components may change over time, due to creep and/or wear. For example, the leaf spring constantly applies a lateral force to the support bracket, which eventually may cause the location of the bearing to creep, i.e., shift relative to the rest of the case. As a result, the location of the codewheel relative to the light emitter and photodetector may shift, causing the transition point to shift as well. Another problem occurs as a result of wear on the contacting surfaces and/or fatigue in the leaf spring. As a result, the mechanical accuracy of the detent positions relative to the encoder signal output in a given assembly may change over time. In consideration of these and other problems related to accurately detecting transitions as the encoder wheel is rotated, acceptable angular ranges 90 and 92 shown in FIG. 9 have been specified for the occurrence of a transition point relative to the adjacent detent positions.
Another problem with the prior art design is that the metal in the leaf spring and coil spring can provide a conduit for an electrostatic discharge (ESD) to susceptible internal components, which may adversely affect the electrical components of the pointing device or of the computer to which the device is coupled.
It would therefore be desirable to provide a detented optical encoder control device that avoids the problems of the prior art devices discussed above. Such a device should eliminate or minimize the effects of bounce back, should avoid using component that can cause ESD, and should enable components to be used for the device that are of acceptably low cost and do not require unreasonably tight tolerances or require costly assembly procedures.
The invention provides a solution to the foregoing problems by replacing much of the prior art assembly with a single spring biased member, which is referred to herein as an xe2x80x9copto spacer.xe2x80x9d The opto spacer includes means for locating the light emitter and photodetector (i.e., phototransistors) relative to detent positions of the codewheel such that the output signal from the photodetector that is indicative of the detent positions is much more consistent. Furthermore, the opto spacer, which is preferably made from a plastic, carries out the functions of both the metal leaf spring and metal coil spring used in the prior art design, thereby removing two potential sources of ESD.
According to a first aspect of the invention, a detented encoder suitable for use in a computer input device such as a mouse is provided comprising conventional optical encoder components including a light source (preferably an LED with appropriate lens), a light sensor (i.e., photodetector), and a codewheel. The light source directs light at the light sensor, which preferably comprises a pair of phototransistors or photodiodes. The codewheel includes a plurality of radially-extending, evenly spaced-apart teeth that define slots, and the codewheel is positioned such the teeth and slots are disposed between the light source and light sensor. Upon rotation of the codewheel, the teeth interrupt the light from the light source reaching the light sensor. The codewheel is mounted on a shaft (or preferably the shaft and codewheel are formed as an integral part) that includes a portion having a plurality of longitudinally extending slots defined in a surface thereof. Mounted to the shaft is the wheel that is turned by a user. The shaft is supported at one end by a bearing surface defined in a support bracket that is coupled to a support member.
A key component of the invention is the opto spacer, which is preferably made of plastic and operatively coupled to the support member, preferably by being mounted to a printed circuit board (PCB), which in turn is mounted to the support member. The opto spacer is preferably mounted to the PCB by legs that engage holes defined in the PCB and includes a base portion that provides an alignment hole mated with an alignment pin extending from the support member through the PCB so as to locate the opto spacer relative to the support member. The base portion of the opto spacer also preferably includes alignment holes for locating the light source and light sensor.
The opto spacer further comprises a cantilever portion connected to the base portion by a pair of elastomeric arms, thereby enabling the cantilever portion to apply a biasing force against the shaft when the arms are flexed. The cantilever portion comprises a U-shaped opening that is sized to receive the splined portion of the shaft and includes a protrusion disposed generally in its center. The protrusion engages a spline in the splined portion of the shaft. The biasing force exerted by the cantilever portion through the protrusion provides a pre-load against the splined portion of the shaft such that when the shaft is rotated by the wheel, the cantilever portion flexes as the protrusion moves in and out of spline wells defined between adjacent spline teeth, thereby producing a detent action that defines a plurality of detent positions at equally-spaced angles of rotation corresponding to the plurality of spline teeth in the splined portion of the shaft. The cantilever portion of the opto spacer may further comprise a pair of bearing surfaces located on the far side of the opening that bear against an adjacent surface on the front side of the support bracket such that when the cantilever portion is caused to flex by the detent action, the movement of the cantilever portion is in a direction substantially transverse to the longitudinal axis of the shaft.
The detented encoder further preferably comprises a slotted bracket connected to the support member that includes a slot sized to receive the free end of the shaft and to control a lateral displacement of the free end of the shaft. The slot in the slotted bracket preferably permits movement of the shaft so as to enable a user to activate a switch located adjacent to the shaft when the user applies a force on the wheel directed toward the switch.
The detented encoder also preferably includes a logic circuit that is used to process a quadrature signal produced by the photodetector. The quadrature signal is processed by the logic device to produce an output signal indicative of the direction and number of detent positions the wheel is turned by the user. A transition between adjacent detents is reported at a point where rotation of the codewheel to the next detent position is certain to occur if the user releases the wheel, thereby substantially avoiding the problems associated with bounce back.